/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Employee.java
 *
 * Created on Oct 29, 2011, 3:44:20 PM
 */
package VIMS;

/**
 *
 * @author shyan
 */
public class Truck extends javax.swing.JFrame {

    /** Creates new form Employee */
    public Truck() {
        super("Add New Truck");
        initComponents();
        setLocationRelativeTo(null);
    }
    
    public Truck(String state) {
        super("Add New Truck");
        initComponents();
        setLocationRelativeTo(null);
        AddTruck.setText(state);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLayeredPane1 = new javax.swing.JLayeredPane();
        IdField = new javax.swing.JLabel();
        UidLabel = new javax.swing.JLabel();
        UserName = new javax.swing.JTextField();
        UnLabel = new javax.swing.JLabel();
        FnLabel = new javax.swing.JLabel();
        Truck = new javax.swing.JTextField();
        TModelLabel = new javax.swing.JLabel();
        TruckModel = new javax.swing.JTextField();
        TPurchaseYearLabel = new javax.swing.JLabel();
        TruckCapacity = new javax.swing.JTextField();
        TCapacityLabel = new javax.swing.JLabel();
        TStatusLabel = new javax.swing.JLabel();
        TruckStatus = new javax.swing.JComboBox();
        AddTruck = new javax.swing.JButton();
        CloseAddTruck = new javax.swing.JButton();
        TruckPic = new javax.swing.JLabel();
        jComboBox1 = new javax.swing.JComboBox();
        jComboBox2 = new javax.swing.JComboBox();
        jComboBox3 = new javax.swing.JComboBox();
        note = new javax.swing.JLabel();
        Border = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(800, 600));

        jLayeredPane1.setMaximumSize(new java.awt.Dimension(800, 600));
        jLayeredPane1.setMinimumSize(new java.awt.Dimension(800, 600));

        IdField.setText("300002");
        IdField.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        IdField.setBounds(490, 90, 150, 30);
        jLayeredPane1.add(IdField, javax.swing.JLayeredPane.DEFAULT_LAYER);

        UidLabel.setText("Truck ID   :");
        UidLabel.setBounds(390, 90, 90, 30);
        jLayeredPane1.add(UidLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
        UserName.setBounds(490, 130, 150, 30);
        jLayeredPane1.add(UserName, javax.swing.JLayeredPane.DEFAULT_LAYER);

        UnLabel.setText("Plat Number   :");
        UnLabel.setBounds(390, 130, 90, 30);
        jLayeredPane1.add(UnLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        FnLabel.setText("Manufacturer   :");
        FnLabel.setBounds(390, 170, 90, 30);
        jLayeredPane1.add(FnLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
        Truck.setBounds(490, 170, 150, 30);
        jLayeredPane1.add(Truck, javax.swing.JLayeredPane.DEFAULT_LAYER);

        TModelLabel.setText("Model   :");
        TModelLabel.setBounds(390, 210, 90, 30);
        jLayeredPane1.add(TModelLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
        TruckModel.setBounds(490, 210, 150, 30);
        jLayeredPane1.add(TruckModel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        TPurchaseYearLabel.setText("Purchase Date   :");
        TPurchaseYearLabel.setBounds(390, 290, 100, 30);
        jLayeredPane1.add(TPurchaseYearLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
        TruckCapacity.setBounds(490, 250, 150, 30);
        jLayeredPane1.add(TruckCapacity, javax.swing.JLayeredPane.DEFAULT_LAYER);

        TCapacityLabel.setText("Capacity   :");
        TCapacityLabel.setBounds(390, 250, 90, 30);
        jLayeredPane1.add(TCapacityLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        TStatusLabel.setText("Status   :");
        TStatusLabel.setBounds(390, 330, 100, 30);
        jLayeredPane1.add(TStatusLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        TruckStatus.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Choose", "Available", "Unavailable" }));
        TruckStatus.setBounds(490, 330, 120, 30);
        jLayeredPane1.add(TruckStatus, javax.swing.JLayeredPane.DEFAULT_LAYER);

        AddTruck.setText("Add");
        AddTruck.setBounds(580, 550, 80, 30);
        jLayeredPane1.add(AddTruck, javax.swing.JLayeredPane.DEFAULT_LAYER);

        CloseAddTruck.setText("Cancel");
        CloseAddTruck.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CloseAddTruckActionPerformed(evt);
            }
        });
        CloseAddTruck.setBounds(660, 550, 80, 30);
        jLayeredPane1.add(CloseAddTruck, javax.swing.JLayeredPane.DEFAULT_LAYER);

        TruckPic.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        TruckPic.setText("Truck Picture");
        TruckPic.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        TruckPic.setBounds(30, 50, 320, 470);
        jLayeredPane1.add(TruckPic, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Year", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020" }));
        jComboBox1.setBounds(490, 290, 80, 30);
        jLayeredPane1.add(jComboBox1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Month", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec" }));
        jComboBox2.setBounds(580, 290, 80, 30);
        jLayeredPane1.add(jComboBox2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Day", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }));
        jComboBox3.setBounds(670, 290, 80, 30);
        jLayeredPane1.add(jComboBox3, javax.swing.JLayeredPane.DEFAULT_LAYER);

        note.setFont(new java.awt.Font("Tahoma", 2, 11));
        note.setForeground(new java.awt.Color(255, 0, 51));
        note.setText("*plalet");
        note.setBounds(660, 250, 70, 30);
        jLayeredPane1.add(note, javax.swing.JLayeredPane.DEFAULT_LAYER);

        Border.setFont(new java.awt.Font("Tahoma", 1, 18));
        Border.setBorder(javax.swing.BorderFactory.createTitledBorder("Truck's Details :"));
        Border.setBounds(370, 50, 400, 350);
        jLayeredPane1.add(Border, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 800, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 600, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void CloseAddTruckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CloseAddTruckActionPerformed
        this.setVisible(false);
    }//GEN-LAST:event_CloseAddTruckActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Truck.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Truck.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Truck.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Truck.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Truck().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton AddTruck;
    private javax.swing.JLabel Border;
    private javax.swing.JButton CloseAddTruck;
    private javax.swing.JLabel FnLabel;
    private javax.swing.JLabel IdField;
    private javax.swing.JLabel TCapacityLabel;
    private javax.swing.JLabel TModelLabel;
    private javax.swing.JLabel TPurchaseYearLabel;
    private javax.swing.JLabel TStatusLabel;
    private javax.swing.JTextField Truck;
    private javax.swing.JTextField TruckCapacity;
    private javax.swing.JTextField TruckModel;
    private javax.swing.JLabel TruckPic;
    private javax.swing.JComboBox TruckStatus;
    private javax.swing.JLabel UidLabel;
    private javax.swing.JLabel UnLabel;
    private javax.swing.JTextField UserName;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JComboBox jComboBox2;
    private javax.swing.JComboBox jComboBox3;
    private javax.swing.JLayeredPane jLayeredPane1;
    private javax.swing.JLabel note;
    // End of variables declaration//GEN-END:variables
}
